.class public Lcom/xingbook/baike/d/b;
.super Landroid/view/View;


# instance fields
.field a:F

.field public b:F

.field public c:F

.field public d:F

.field public e:F

.field public f:I

.field public g:I

.field public h:Lcom/xingbook/baike/b/b;

.field public i:Landroid/graphics/Paint;

.field private j:Landroid/graphics/RectF;

.field private k:Landroid/graphics/Bitmap;


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 2

    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    const v0, -0xcccccd

    iput v0, p0, Lcom/xingbook/baike/d/b;->f:I

    const v0, -0x99999a

    iput v0, p0, Lcom/xingbook/baike/d/b;->g:I

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    invoke-static {p1}, Lcom/xingbook/c/n;->b(Landroid/app/Activity;)F

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/b;->a:F

    const/high16 v0, 0x421c

    iget v1, p0, Lcom/xingbook/baike/d/b;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/b;->b:F

    const/high16 v0, 0x4244

    iget v1, p0, Lcom/xingbook/baike/d/b;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/b;->c:F

    const/high16 v0, 0x4200

    iget v1, p0, Lcom/xingbook/baike/d/b;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/b;->d:F

    const/high16 v0, 0x422c

    iget v1, p0, Lcom/xingbook/baike/d/b;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/b;->e:F

    return-void
.end method


# virtual methods
.method public a(II)Landroid/graphics/Bitmap;
    .locals 4

    packed-switch p1, :pswitch_data_0

    const v0, 0x7f02001d

    :goto_0
    invoke-virtual {p0}, Lcom/xingbook/baike/d/b;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-static {v1, v0}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v1

    int-to-float v0, p2

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    int-to-float v2, v2

    div-float/2addr v0, v2

    const/high16 v2, 0x3f80

    cmpl-float v2, v0, v2

    if-eqz v2, :cond_0

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v2

    int-to-float v2, v2

    mul-float/2addr v2, v0

    float-to-int v2, v2

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    int-to-float v3, v3

    mul-float/2addr v0, v3

    float-to-int v0, v0

    const/4 v3, 0x0

    invoke-static {v1, v2, v0, v3}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    :goto_1
    return-object v0

    :pswitch_0
    const v0, 0x7f020018

    goto :goto_0

    :pswitch_1
    const v0, 0x7f020019

    goto :goto_0

    :pswitch_2
    const v0, 0x7f02001a

    goto :goto_0

    :pswitch_3
    const v0, 0x7f02001b

    goto :goto_0

    :pswitch_4
    const v0, 0x7f02001c

    goto :goto_0

    :cond_0
    move-object v0, v1

    goto :goto_1

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
    .end packed-switch
.end method

.method public a(Lcom/xingbook/baike/b/b;)V
    .locals 6

    iget v2, p0, Lcom/xingbook/baike/d/b;->b:F

    iget v3, p0, Lcom/xingbook/baike/d/b;->c:F

    iget v4, p0, Lcom/xingbook/baike/d/b;->d:F

    iget v5, p0, Lcom/xingbook/baike/d/b;->e:F

    move-object v0, p0

    move-object v1, p1

    invoke-virtual/range {v0 .. v5}, Lcom/xingbook/baike/d/b;->a(Lcom/xingbook/baike/b/b;FFFF)V

    return-void
.end method

.method public a(Lcom/xingbook/baike/b/b;FFFF)V
    .locals 4

    iput-object p1, p0, Lcom/xingbook/baike/d/b;->h:Lcom/xingbook/baike/b/b;

    iput p2, p0, Lcom/xingbook/baike/d/b;->b:F

    iput p3, p0, Lcom/xingbook/baike/d/b;->c:F

    iput p4, p0, Lcom/xingbook/baike/d/b;->d:F

    iput p5, p0, Lcom/xingbook/baike/d/b;->e:F

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    :cond_0
    invoke-virtual {p1}, Lcom/xingbook/baike/b/b;->d()I

    move-result v0

    iget v1, p0, Lcom/xingbook/baike/d/b;->d:F

    iget v2, p0, Lcom/xingbook/baike/d/b;->d:F

    sub-float v2, p3, v2

    const/high16 v3, 0x4040

    div-float/2addr v2, v3

    add-float/2addr v1, v2

    float-to-int v1, v1

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/baike/d/b;->a(II)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 14

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->h:Lcom/xingbook/baike/b/b;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v0, v0, Landroid/graphics/RectF;->right:F

    const/4 v1, 0x0

    cmpl-float v0, v0, v1

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v0, v0, Landroid/graphics/RectF;->bottom:F

    const/4 v1, 0x0

    cmpl-float v0, v0, v1

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v3, v0, Landroid/graphics/RectF;->right:F

    const/4 v2, 0x0

    const/4 v1, 0x0

    const/4 v0, 0x1

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    iget v5, p0, Lcom/xingbook/baike/d/b;->f:I

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    iget v5, p0, Lcom/xingbook/baike/d/b;->b:F

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setTextSize(F)V

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    const/4 v5, 0x1

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    sget-object v5, Landroid/graphics/Typeface;->DEFAULT:Landroid/graphics/Typeface;

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v4}, Landroid/graphics/Paint;->getFontMetrics()Landroid/graphics/Paint$FontMetrics;

    move-result-object v4

    iget v5, p0, Lcom/xingbook/baike/d/b;->c:F

    iget v6, v4, Landroid/graphics/Paint$FontMetrics;->descent:F

    sub-float/2addr v5, v6

    iget v4, v4, Landroid/graphics/Paint$FontMetrics;->ascent:F

    sub-float v4, v5, v4

    const/high16 v5, 0x4000

    div-float v7, v4, v5

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->h:Lcom/xingbook/baike/b/b;

    invoke-virtual {v4}, Lcom/xingbook/baike/b/b;->c()Ljava/lang/String;

    move-result-object v8

    if-eqz v8, :cond_3

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v4, v8}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v4

    add-float/2addr v4, v1

    cmpl-float v4, v4, v3

    if-lez v4, :cond_8

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v9

    new-array v10, v9, [F

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v4, v8, v10}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    const/4 v6, 0x0

    const/4 v5, 0x0

    const/4 v4, 0x0

    move v12, v4

    move v4, v1

    move v1, v12

    move v13, v6

    move v6, v3

    move v3, v0

    move v0, v5

    move v5, v2

    move v2, v13

    :goto_1
    if-lt v1, v9, :cond_5

    if-ge v0, v9, :cond_2

    const/4 v1, 0x0

    cmpl-float v1, v2, v1

    if-lez v1, :cond_2

    invoke-virtual {v8, v0, v9}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    int-to-float v1, v5

    add-float/2addr v1, v7

    iget-object v7, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v4, v1, v7}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    const/high16 v0, 0x40a0

    iget v1, p0, Lcom/xingbook/baike/d/b;->a:F

    mul-float/2addr v0, v1

    add-float/2addr v0, v2

    iget-object v1, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    int-to-float v1, v1

    add-float/2addr v0, v1

    cmpl-float v0, v0, v6

    if-lez v0, :cond_7

    int-to-float v0, v5

    iget v1, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v0, v1

    float-to-int v5, v0

    const/4 v4, 0x0

    add-int/lit8 v3, v3, 0x1

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v0, v0, Landroid/graphics/RectF;->right:F

    :cond_2
    :goto_2
    iget-object v0, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    iget v1, p0, Lcom/xingbook/baike/d/b;->c:F

    iget-object v2, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    int-to-float v2, v2

    sub-float/2addr v1, v2

    const/high16 v2, 0x4000

    div-float/2addr v1, v2

    int-to-float v2, v5

    add-float/2addr v1, v2

    const/4 v2, 0x0

    invoke-virtual {p1, v0, v4, v1, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v0, v5

    iget v1, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v0, v1

    float-to-int v2, v0

    const/4 v1, 0x0

    add-int/lit8 v0, v3, 0x1

    iget-object v3, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v3, v3, Landroid/graphics/RectF;->right:F

    :cond_3
    :goto_3
    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    iget v5, p0, Lcom/xingbook/baike/d/b;->g:I

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    iget v5, p0, Lcom/xingbook/baike/d/b;->d:F

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setTextSize(F)V

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    sget-object v5, Landroid/graphics/Typeface;->SERIF:Landroid/graphics/Typeface;

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v4}, Landroid/graphics/Paint;->getFontMetrics()Landroid/graphics/Paint$FontMetrics;

    move-result-object v4

    iget-object v5, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    iget v6, p0, Lcom/xingbook/baike/d/b;->g:I

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setColor(I)V

    iget v5, p0, Lcom/xingbook/baike/d/b;->c:F

    iget v6, v4, Landroid/graphics/Paint$FontMetrics;->descent:F

    sub-float/2addr v5, v6

    iget v4, v4, Landroid/graphics/Paint$FontMetrics;->ascent:F

    sub-float v4, v5, v4

    const/high16 v5, 0x4000

    div-float v7, v4, v5

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->h:Lcom/xingbook/baike/b/b;

    invoke-virtual {v4}, Lcom/xingbook/baike/b/b;->g()Ljava/lang/String;

    move-result-object v8

    if-eqz v8, :cond_4

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v4, v8}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v4

    cmpl-float v4, v4, v3

    if-lez v4, :cond_d

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v9

    new-array v10, v9, [F

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v4, v8, v10}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    const/4 v6, 0x0

    const/4 v5, 0x0

    const/4 v4, 0x0

    move v12, v4

    move v4, v0

    move v0, v3

    move v3, v6

    move v6, v2

    move v2, v5

    move v5, v1

    move v1, v12

    :goto_4
    if-lt v1, v9, :cond_a

    :goto_5
    if-lez v1, :cond_4

    const/4 v0, 0x0

    cmpl-float v0, v3, v0

    if-lez v0, :cond_4

    invoke-virtual {v8, v2, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    int-to-float v1, v6

    add-float/2addr v1, v7

    iget-object v2, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v5, v1, v2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    :cond_4
    :goto_6
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    goto/16 :goto_0

    :cond_5
    aget v11, v10, v1

    add-float/2addr v2, v11

    cmpl-float v11, v2, v6

    if-lez v11, :cond_6

    invoke-virtual {v8, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    int-to-float v2, v5

    add-float/2addr v2, v7

    iget-object v6, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v4, v2, v6}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    aget v0, v10, v1

    int-to-float v2, v5

    iget v4, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v2, v4

    float-to-int v5, v2

    const/4 v4, 0x0

    add-int/lit8 v2, v3, 0x1

    iget-object v3, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v3, v3, Landroid/graphics/RectF;->right:F

    move v6, v3

    move v3, v2

    move v2, v0

    move v0, v1

    :cond_6
    add-int/lit8 v1, v1, 0x1

    goto/16 :goto_1

    :cond_7
    const/high16 v0, 0x40a0

    iget v1, p0, Lcom/xingbook/baike/d/b;->a:F

    mul-float/2addr v0, v1

    add-float v4, v2, v0

    goto/16 :goto_2

    :cond_8
    iget-object v0, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v0, v8}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v0

    add-float/2addr v0, v1

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v4}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v4

    int-to-float v4, v4

    add-float/2addr v0, v4

    cmpl-float v0, v0, v3

    if-lez v0, :cond_9

    const/4 v0, 0x0

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v3

    add-int/lit8 v3, v3, -0x1

    invoke-virtual {v8, v0, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    int-to-float v3, v2

    add-float/2addr v3, v7

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    int-to-float v0, v2

    iget v1, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v0, v1

    float-to-int v0, v0

    const/4 v1, 0x0

    iget-object v2, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v2, v2, Landroid/graphics/RectF;->right:F

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v3

    invoke-virtual {v8, v2, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    int-to-float v3, v0

    add-float/2addr v3, v7

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v2, v1, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget-object v1, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v3

    invoke-virtual {v8, v2, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v1

    iget-object v2, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    iget v3, p0, Lcom/xingbook/baike/d/b;->c:F

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v4}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    int-to-float v4, v4

    sub-float/2addr v3, v4

    const/high16 v4, 0x4000

    div-float/2addr v3, v4

    int-to-float v4, v0

    add-float/2addr v3, v4

    const/4 v4, 0x0

    invoke-virtual {p1, v2, v1, v3, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v0, v0

    iget v1, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v0, v1

    float-to-int v2, v0

    const/4 v1, 0x0

    const/4 v0, 0x3

    iget-object v3, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v3, v3, Landroid/graphics/RectF;->right:F

    goto/16 :goto_3

    :cond_9
    int-to-float v0, v2

    add-float/2addr v0, v7

    iget-object v3, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v8, v1, v0, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v0, v8}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v0

    add-float/2addr v0, v1

    iget-object v1, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    iget v3, p0, Lcom/xingbook/baike/d/b;->c:F

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v4}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    int-to-float v4, v4

    sub-float/2addr v3, v4

    const/high16 v4, 0x4000

    div-float/2addr v3, v4

    int-to-float v4, v2

    add-float/2addr v3, v4

    const/4 v4, 0x0

    invoke-virtual {p1, v1, v0, v3, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v0, v2

    iget v1, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v0, v1

    float-to-int v2, v0

    const/4 v1, 0x0

    const/4 v0, 0x2

    iget-object v3, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v3, v3, Landroid/graphics/RectF;->right:F

    goto/16 :goto_3

    :cond_a
    aget v11, v10, v1

    add-float/2addr v3, v11

    cmpl-float v11, v3, v0

    if-lez v11, :cond_e

    const/4 v0, 0x6

    if-lt v4, v0, :cond_c

    add-int/lit8 v0, v1, -0x2

    if-le v0, v2, :cond_b

    new-instance v0, Ljava/lang/StringBuilder;

    add-int/lit8 v1, v1, -0x2

    invoke-virtual {v8, v2, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "\u2026"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :goto_7
    int-to-float v1, v6

    add-float/2addr v1, v7

    iget-object v9, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v5, v1, v9}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    const/4 v1, 0x0

    int-to-float v0, v6

    iget v5, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v0, v5

    float-to-int v6, v0

    const/4 v5, 0x0

    add-int/lit8 v0, v4, 0x1

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v0, v0, Landroid/graphics/RectF;->right:F

    goto/16 :goto_5

    :cond_b
    const-string v0, "\u2026"

    goto :goto_7

    :cond_c
    invoke-virtual {v8, v2, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    int-to-float v2, v6

    add-float/2addr v2, v7

    iget-object v3, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v5, v2, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    aget v0, v10, v1

    int-to-float v2, v6

    iget v3, p0, Lcom/xingbook/baike/d/b;->c:F

    add-float/2addr v2, v3

    float-to-int v5, v2

    const/4 v3, 0x0

    add-int/lit8 v2, v4, 0x1

    iget-object v4, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    iget v4, v4, Landroid/graphics/RectF;->right:F

    move v6, v4

    move v4, v3

    move v3, v2

    move v2, v0

    move v0, v1

    :goto_8
    add-int/lit8 v1, v1, 0x1

    move v12, v0

    move v0, v6

    move v6, v5

    move v5, v4

    move v4, v3

    move v3, v2

    move v2, v12

    goto/16 :goto_4

    :cond_d
    int-to-float v0, v2

    add-float/2addr v0, v7

    iget-object v2, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {p1, v8, v1, v0, v2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->i:Landroid/graphics/Paint;

    invoke-virtual {v0, v8}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v0

    add-float/2addr v0, v1

    goto/16 :goto_6

    :cond_e
    move v12, v2

    move v2, v3

    move v3, v4

    move v4, v5

    move v5, v6

    move v6, v0

    move v0, v12

    goto :goto_8
.end method

.method protected onLayout(ZIIII)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    sub-int v1, p4, p2

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->right:F

    iget-object v0, p0, Lcom/xingbook/baike/d/b;->j:Landroid/graphics/RectF;

    sub-int v1, p5, p3

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->bottom:F

    invoke-super/range {p0 .. p5}, Landroid/view/View;->onLayout(ZIIII)V

    return-void
.end method
